package com.wander.designCreational.builder.director;

import com.wander.designCreational.builder.builder.Builder;
import com.wander.designCreational.builder.product.Product;

/**
 * @Author : WDYin
 * @Date : 2020/5/9
 * @Description :
 */
public class Director {

    private Builder builder;

    public Director(Builder builder) {
        this.builder = builder;
    }

    public Product build() {
        builder.buildPart1();
        builder.buildPart2();
        builder.buildPart3();
        return builder.getResult();
    }
}
